<ol class="breadcrumb">
  <li><a href="<%= path_for %>"><%= @model.display_name %></a></li>
  <li class="active"><%= @resource.display_name %></li>
</ol>
<% if session[:flash] %>
  <div class="alert alert-success"><%= h session[:flash] %></div>
  <% session.delete(:flash) %>
<% end %>
<table class="table">
<% @fields.each do |field| %>
  <tr>
    <th class="col-sm-2" style="text-align: right; padding-right: 20px;"><%= t field %></th>
    <td><%= present @resource, field %></td>
  </tr>
<% end %>
<tr>
  <th></th>
  <td>
    <% if @resource.writable? current_user %>
    <a class="btn btn-warning" href="<%= path_for @resource.id, "edit" %>"><%= t :edit %></a>
    <% end %>
    <% if @resource.deletable? current_user %>
    <a class="btn btn-danger" href="<%= path_for @resource.id, "delete" %>" data-method="post"><%= t :delete %></a>
    <% end %>
  </td>
</tr>
</table>
